/**
 * Created by XiongXuan on 2018/1/8.
 */
var logoutUrl = "http://127.0.0.1:8085/login";

function logout() {
    $.ajax({
        traditional: true,
        type: "DELETE", //用delete方式传输
        url: logoutUrl,
        success: function (result) {
            console.log(result);
            if (result.code == 1) {
                location.reload();
            }
            else {
                alert(result.msg);
            }
        },
        datatype: "json"
    })
}